package cn.xie.domain.strategy.repository;

import cn.xie.domain.strategy.model.entity.StrategyAwardEntity;
import cn.xie.domain.strategy.model.entity.StrategyEntity;
import cn.xie.domain.strategy.model.entity.StrategyRuleEntity;

import java.util.List;
import java.util.Map;

/**
 * @author: xiaoxie
 * create: 2025-08-03 17:47
 * @BelongsProject: bit-market
 * @BelongsPackage: cn.xie.domain.strategy.repository
 * description: 策略仓储接口
 */
public interface IStrategyRepository {
    /** 查询策略奖品列表*/
    List<StrategyAwardEntity> queryStrategyAwardList(Long strategyId);
    /** 存放策略奖品块放到Redis中*/
    void storeStrategyAwardSearchRateTable(String strategyId, Integer rateRange, Map<Integer, Integer> strategyAwardSearchRateTable);
    /** 获取概率值奖品查找表的结果*/
    Integer getStrategyAwardAssemble(String strategyId, Integer rateKey);
    /** 获取抽奖概率块范围*/
        int getRateRange(String strategyId);
    /** 通过策略id查询策略实体*/
    StrategyEntity queryStrategyByStrategyId(Long strategyId);

    StrategyRuleEntity queryStrategyRuleByStrategyId(Long strategyId,String ruleModel);
    /** 查询策略规则*/
    String queryStrategyRuleValue(Long strategyId, Integer awardId, String ruleModel);

    StrategyRuleEntity queryStrategyRule(Long strategyId, Integer awardId, String ruleModel);
}
